$(document).ready(function(){
	$(".fancybox").fancybox();
})

function animateBackground() {
	var current = $('.cover:visible');

	if ($(current).next().css('background-image') != 'none') {
		var next = $(current).next();
	} else {
		var next = $('.cover:first');
	}

	$(current).fadeOut(1000);
	$(next).fadeIn(1000);
}